.class Les/xy$w2;
.super Ljava/lang/Object;
.source "EditMenuItemProvider.java"

# interfaces
.implements Landroid/view/MenuItem$OnMenuItemClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Les/xy;->d()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Les/xy;


# direct methods
.method constructor <init>(Les/xy;)V
    .locals 0

    .line 1
    iput-object p1, p0, Les/xy$w2;->a:Les/xy;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onMenuItemClick(Landroid/view/MenuItem;)Z
    .locals 5

    .line 1
    iget-object p1, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {p1}, Les/xy;->c(Les/xy;)Ljava/lang/String;

    move-result-object p1

    const-string v0, "chromecast"

    invoke-static {v0, p1}, Lcom/estrongs/android/statistics/c;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 2
    iget-object p1, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {p1}, Les/xy;->b(Les/xy;)Ljava/util/List;

    move-result-object p1

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result p1

    const-string v0, "Chromecast"

    const/4 v1, 0x0

    const/4 v2, 0x1

    if-ne p1, v2, :cond_1

    iget-object p1, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {p1}, Les/xy;->b(Les/xy;)Ljava/util/List;

    move-result-object p1

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/estrongs/fs/g;

    invoke-interface {p1}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/estrongs/android/util/n0;->Q(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_1

    .line 3
    iget-object p1, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {p1}, Les/xy;->b(Les/xy;)Ljava/util/List;

    move-result-object p1

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/estrongs/fs/g;

    invoke-interface {p1}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object p1

    .line 4
    new-instance v1, Landroid/content/Intent;

    iget-object v3, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {v3}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v3

    const-class v4, Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-direct {v1, v3, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 5
    invoke-static {p1, v2}, Lcom/estrongs/android/util/h0;->b(Ljava/lang/String;Z)Ljava/lang/String;

    move-result-object v3

    .line 6
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->U1(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 7
    invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object p1

    invoke-virtual {v1, p1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    goto :goto_0

    .line 8
    :cond_0
    new-instance v4, Ljava/io/File;

    invoke-direct {v4, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-static {v4}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;

    move-result-object p1

    invoke-virtual {v1, p1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 9
    :goto_0
    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const-string p1, "ChromecastUrl"

    .line 10
    invoke-virtual {v1, p1, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 11
    iget-object p1, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {p1}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object p1

    invoke-virtual {p1, v1}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_1

    .line 12
    :cond_1
    iget-object p1, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {p1}, Les/xy;->b(Les/xy;)Ljava/util/List;

    move-result-object p1

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/estrongs/fs/g;

    invoke-interface {p1}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/estrongs/android/util/n0;->z(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_2

    .line 13
    iget-object p1, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {p1}, Les/xy;->b(Les/xy;)Ljava/util/List;

    move-result-object p1

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/estrongs/fs/g;

    invoke-interface {p1}, Lcom/estrongs/fs/g;->d()Ljava/lang/String;

    move-result-object p1

    .line 14
    new-instance v1, Landroid/content/Intent;

    iget-object v3, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {v3}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object v3

    const-class v4, Lcom/estrongs/android/pop/app/imageviewer/ViewImage21;

    invoke-direct {v1, v3, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 15
    invoke-static {p1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object p1

    invoke-virtual {v1, p1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 16
    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 17
    iget-object p1, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {p1}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object p1

    invoke-virtual {p1, v1}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->startActivity(Landroid/content/Intent;)V

    goto :goto_1

    .line 18
    :cond_2
    iget-object p1, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {p1}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object p1

    iget-object v0, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {v0}, Les/xy;->b(Les/xy;)Ljava/util/List;

    move-result-object v0

    invoke-static {v0}, Lcom/estrongs/android/util/o0;->a(Ljava/util/List;)Ljava/util/List;

    move-result-object v0

    invoke-static {p1, v1, v0, v2}, Les/xy;->a(Lcom/estrongs/android/pop/view/FileExplorerActivity;ZLjava/util/List;Z)V

    .line 19
    :goto_1
    iget-object p1, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {p1}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object p1

    invoke-virtual {p1}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->R()V

    .line 20
    :try_start_0
    iget-object p1, p0, Les/xy$w2;->a:Les/xy;

    invoke-static {p1}, Les/xy;->a(Les/xy;)Lcom/estrongs/android/pop/view/FileExplorerActivity;

    move-result-object p1

    invoke-virtual {p1}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->f0()Lcom/estrongs/android/statistics/b;

    move-result-object p1

    const-string v0, "function"

    const-string v1, "more_chromecast_click"

    .line 21
    invoke-virtual {p1, v0, v1}, Lcom/estrongs/android/statistics/b;->a(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_2

    :catch_0
    move-exception p1

    .line 22
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    :goto_2
    return v2
.end method
